<script setup lang="ts">
import { getCurrentInstance } from 'vue'

const that = getCurrentInstance()
const packData = [200, 260, 240, 250, 237, 245, 259, 217, 233]
</script>

<template>
  <div ref="main" style="width: 100%; font-size: 18px">
    <table>
      <tbody>
        <tr>
          <td>当日目标双数: &nbsp</td>
          <td>{{ 240 * 9 }}</td>
          <td>双</td>
          <td></td>
        </tr>
        <tr>
          <td>当前目标双数: &nbsp</td>
          <td>{{ 240 * 9 }}</td>
          <td>双</td>
          <td></td>
        </tr>
        <tr>
          <td>当日缴库双数: &nbsp</td>
          <td>{{ packData.reduce((sum, num) => sum + num) }}</td>
          <td>双</td>
          <td>
            &nbsp&nbsp&nbsp&nbsp&nbsp{{ packData.reduce((sum, num) => sum + num) - 240 * 9 }} &nbsp
            双
          </td>
        </tr>
        <tr>
          <td>缴库达成率: &nbsp</td>
          <td style="color: red">
            {{ Math.floor(packData.reduce((sum, num) => sum + num) / (2.4 * 9)) }} %
          </td>
          <td></td>
        </tr>
      </tbody>
    </table>
  </div>
</template>

<style scoped></style>
